<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>天众云仓</title>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/layer/1.9.3/layer.js"></script>
<link href="__PUBLIC__/css/member.css" rel="stylesheet" />
<style>
	.bz{
		font-size:12px !important;
		color:#FF0202 !important;
		text-align:left !important;
		width:175px !important;
		display:none;
	}
	.radio {
		width: 13px !important;
	}
	.label_d{
		float:left;
	}
</style>
</head>

<body>
<!--header-->
<div class="warp_top">
  <div class="topl">
    <div class="top_logo"><img src="__PUBLIC__/member_img/logo1.png" /></div>
    <div class="top_fonts">
      <h4>天众云仓-仓储端管理系统</h4>
      <p>Teams YunCang - warehouse management system</p>
    </div>
    <div class="clear"></div>
  </div>
  <ul class="topr">
    <li><a href="#">官网首页</a></li>
    <li><a href="#">帮助与文档</a></li>
    <li><a href="#">客服电话：0571-86895631</a></li>
  </ul>
  <div class="clear"></div>
</div>
<!--header-->

<!--main-->
<div class="main_warp">
<div class="main_center">
  <div class="main_cenl">
    <p>已经注册账号？立即登录</p>
    <a href="__MODULE__/login/index"><button>登录</button></a>
  </div>
  <div class="main_cenr">
    <h4>注册新会员</h4>
    <div class="main_reg">
      <div class="main_regin">
        <span>企业名称：</span>
		<input  onFocus="this.value = '';" onBlur="if (this.value == '') {this.value = '';}"  value=""  type="text" name="warehouse_name" class=""><span class="bz">*请填写仓库全称</span>
        <div class="clear"></div>
      </div>
      <div class="main_regin">
        <span>仓库编码：</span>
        <input  value="{:rand(10000000,99999999)}"  readonly type="text" name="warehouse_code" style="background:#ccc"><span class="bz">*请牢记您的仓库编码</span>
        <div class="clear"></div>
      </div>
      <div class="main_regin">
        <span>手机号码：</span>
        <input  onFocus="this.value = '';" name="name"  onBlur="if (this.value == '') {this.value = '';}"  value=""  type="text" class=""><span class="bz">*作为登录的唯一标识</span>
        <div class="clear"></div>
      </div>
      <div class="main_regin">
        <span>昵称：</span>
        <input  onFocus="this.value = '';" name="nick_name"  onBlur="if (this.value == '') {this.value = '';}"  value=""  type="text" class=""><span class="bz">*作为登录的唯一标识，方便登录</span>
        <div class="clear"></div>
      </div>
      <div class="main_regin">
        <span>密码：</span>
        <input  onFocus="this.value = '';" onBlur="if (this.value == '') {this.value = '';}"  value=""  type="password" name="pwd" class=""><span class="bz">*请填写密码</span>
        <div class="clear"></div>
      </div>
      
      <div class="main_regin">
        <span>重复密码：</span>
        <input  onFocus="this.value = '';" onBlur="if (this.value == '') {this.value = '';}"  value=""  type="password" name="pwd2" class=""><span class="bz">*请再次填写密码</span>
        <div class="clear"></div>
      </div>
      
       <div class="main_regin wc">
        <span>仓库类型：</span>
        <select class="easyui-combobox warehouse_cate" name="warehouse_cate" style="width:282px;height:38px;"><span class="bz">*请选择仓库类型</span>
				<option value="0">未选择</option>
				<option value="1">一般仓</option>
				<option value="2">跨境仓</option>
		</select>
        <div class="clear"></div>
      </div>
      <div class="main_regin">
        <span>验证码：</span>
        <input  onFocus="this.value = '';" onBlur="if (this.value == '') {this.value = '';}"  value=""  type="text" name="verify" style="width:50px;">
		<img id="verifyImg1" src="{:U('Login/verify')}" align="absbottom" onClick="fleshVerify()" style="cursor:pointer;height:39px;"/>
        <div class="clear"></div>
      </div>
      <button class="rebutton regbutton"  onclick="doReg()">注册</button>
      
    </div>
  </div>
  <div class="clear"></div>
</div>
</div>


<!--main-->


<!--bottom-->

<div class="bottom_warp">
	<p class="fcopy">友情链接：百度  腾讯  网易  阿里巴巴  菜鸟科技  顺丰  百世  中通  </p>
  <p class="fcopy">▪&nbsp;&nbsp;copyright © 天众供应链有限公司&nbsp;&nbsp;浙ICP 20170000001▪</p>
</div>
<!--bottom-->

<script>
	$('input').focus(function(){
		$(this).parents().find('.bz').hide();
		$(this).parent().find('.bz').eq(0).show(100);
	})
	$('select').focus(function(){
		$(this).parents().find('.bz').hide();
		$(this).parent().find('.bz').eq(0).show(100);
	})
	/*
     *重载验证码
     */
    function fleshVerify(){
        var timenow = new Date().getTime();
        document.getElementById('verifyImg1').src= '{:U("Login/verify","","")}'+'/'+timenow;
    }
    //注册
   function doReg(){
		var phone=$('input[name=name]').val();
		var nick_name=$('input[name=nick_name]').val();
		
		var myreg = /^(((13[0-9]{1})|(17[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/; 
		if(!myreg.test(phone))
		{
			layer.msg('请输入有效的手机号码！');
		    return false; 
		}
		if(myreg.test(nick_name))
		{
			layer.msg('昵称不能使用手机号码');
		    return false; 
		}
		if($("input[name=pwd]").val()!=$("input[name=pwd2]").val()){
			layer.msg('两次输入密码不一致！');
		}
       var url="{:U('Login/checkReg')}";
	   $.post(url,{
            warehouse_name:$("input[name=warehouse_name]").val(),
            warehouse_code:$("input[name=warehouse_code]").val(),
            name:$("input[name=name]").val(),
			nick_name:nick_name,
            pwd:$("input[name=pwd]").val(),
            warehouse_cate:$(".warehouse_cate").val(),
			verify:$("input[name=verify]").val()
        },function(msg){
            layer.msg(msg.data);
            if(msg.status==1){
                layer.msg(msg.message,function(r){
						location.href="{:U('Index/index')}";
					});
            }else{
                layer.msg(msg.message,function(){fleshVerify();});
            }
        },'json');
   }
</script>
</body>
</html>
